import random

def use_potion(color):
    health_change = 0
    if color == "紫色":
        health_change = 10
    elif color == "粉色":
        health_change = 4
    elif color == "绿色":
        health_change = -2
    elif color == "蓝色":
        health_change = 1
    return health_change

health = 12

# 增加找到蓝色魔法药水并使用
print("你找到了蓝色魔法药水！")
health += use_potion("蓝色")

print("你找到了一些魔法药水，有：绿色、粉色、紫色......")
potion = input("你想使用那种药水？")
# 每种药水都会治愈或者伤害一定量的健康值
# health_change = 0
# if potion == "紫色":
#     health_change = 10
# elif potion == "粉色":
#     health_change = 4
# elif potion == "绿色":
#     health_change = -2

# health += health_change
health += use_potion(potion)

# 玩家在穿越熔岩时受到伤害
health_change = random.randint (1, 10)
print ("哎哟！刚进山洞，熔岩就烫伤了你的脚，掉了", health_change, "点健康值")
health -= health_change

potion = input("你想使用那种药水？")
# 每种药水都会治愈或者伤害一定量的健康值
# health_change = 0
# if potion == "紫色":
#     health_change = 10
# elif potion == "粉色":
#     health_change = 4
# elif potion == "绿色":
#     health_change = -2

# health += health_change
health += use_potion(potion)

print("你当前还有", health, "点健康值")